Programming With QuickTime VR 2.1

Previous | Overview | Contents | Next

Panorama Track

A movie's panorama track is a track that contains information about the panoramic nodes in a scene. (The media type of the panorama track is 'pano' .) Each sample in a panorama track corresponds to a single panoramic node. This sample parallels the corresponding node in the QTVR track. Panorama tracks do not have a sample description (although QuickTime requires that you specify a "dummy" sample description when you call AddMediaSample to add a sample to a panorama track). The sample itself contains the data that specifies the track reference indexes of the scene and hot spot tracks. In addition, the sample contains information about how the panoramic image has been diced, as well as the viewing angle limits and default view angles for the panorama. The image and hot spot tracks for a panorama can be obtained using the QuickTime GetTrackReference function.

The panorama image track is referenced by a track reference of type kQTVRImageTrackRefType ; the hot spot image track is referenced by a track reference of type kQTVRHotSpotTrackRefType .

The actual panoramic image for a panoramic node is contained in a panorama image track, which is a standard QuickTime video track. The panoramic image can be created in many ways. You can use the stitcher provided by the QuickTime VR Authoring Suite to stitch together several photographs. Alternatively, you can use a graphics rendering application or a panoramic camera.

QuickTime VR version 2.0 requires the original panoramic image to be rotated 90 degrees counterclockwise. The rotated image must then be diced into smaller frames. Each diced frame is compressed and added to the video track as a video sample. (See Figure 1 .) Frames can be compressed using any spatial compressor; temporal compression is not allowed for panoramic movies.

A panorama sample atom (which contains information about a single panorama) contains a flag that indicates whether the diced panoramic image is oriented horizontally or vertically. Currently, only vertical orientation is supported. Future versions of QuickTime VR might support horizontal panoramic images.

Figure 1 Creating an image track for a panorama

It's possible to store one or more low-resolution versions of a panoramic image in a movie file (called low-resolution image tracks ). If there is not enough memory at runtime to use the normal image track, QuickTime VR uses a lower resolution image track, if available. A low-resolution image track contains diced frames just like the higher resolution track, but the reconstructed panoramic image is half the height and half the width of the higher resolution image. The number of diced frames in the lower resolution image track is usually half that in the normal image track.

When a panorama contains hot spots, the movie file contains a hot spot image track, a video track that contains a parallel panorama with the hot spots designated by colored regions. Each diced frame of the hot spot panoramic image must be compressed with a lossless compressor (such as QuickTime's graphics compressor). The dimensions of the hot spot panoramic image are usually the same as those of the image track's panoramic image, but this is not required. The dimensions must, however, have the same aspect ratio as the image track's panoramic image. A hot spot image track should be 8 bits deep.

In QuickTime VR version 2.0, the panoramic images in the lower resolution image tracks and the hot spot image tracks, if present, must be rotated 90 degrees counterclockwise (just like image in the panorama image track).


© 1997 Apple Computer, Inc.

Previous | Overview | Contents | Next